package com.digitalchina.lxnsy.activity.mainConsult;

import android.webkit.JavascriptInterface;

import com.digitalchina.lxnsy.base.BaseHtmlActivity;
import com.digitalchina.lxnsy.toolkit.CustomDialog;

public class ConsultEvaluateAddActivity extends BaseHtmlActivity {

    private String consultSessionId = "";

    @Override
    protected void loadHtml() {
        webView.addJavascriptObject(new JsApi(), null);
        loadUrl("d1-service-evaluate-add");
        setTitle("服务评价");

        consultSessionId = (String) getIntent().getSerializableExtra("consultSessionId");
    }

    @Override
    public void rightOnClick() {

    }

    public class JsApi {

        @JavascriptInterface
        public String getId(Object msg) {
            return consultSessionId;
        }

        @JavascriptInterface
        public void saveClose(Object msg) {
            setResult(RESULT_OK);
            CustomDialog.nativeDialogFinish(activity,"评价成功");
        }
    }
}
